package org.jeecg.modules.mes.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 生产计划主表
 * @Author: jeecg-boot
 * @Date: 2025-01-21
 * @Version: V1.0
 */
@Data
@TableName("mes_production_plan")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="mes_production_plan对象", description="生产计划主表")
public class MesProductionPlan implements Serializable {
    private static final long serialVersionUID = 1L;

    /**主键*/
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    
    /**计划编号*/
    @Excel(name = "计划编号", width = 15)
    @ApiModelProperty(value = "计划编号")
    private String planNo;
    
    /**关联订单ID*/
    @Excel(name = "关联订单ID", width = 15)
    @ApiModelProperty(value = "关联订单ID")
    private String orderId;
    
    /**关联订单编号*/
    @Excel(name = "关联订单编号", width = 15)
    @ApiModelProperty(value = "关联订单编号")
    private String orderNo;
    
    /**关联订单明细ID*/
    @Excel(name = "关联订单明细ID", width = 15)
    @ApiModelProperty(value = "关联订单明细ID")
    private String orderDetailId;
    
    /**产品信息(门窗系列-窗号-颜色)*/
    @Excel(name = "产品信息", width = 20)
    @ApiModelProperty(value = "产品信息")
    private String productInfo;
    
    /**计划名称*/
    @Excel(name = "计划名称", width = 15)
    @ApiModelProperty(value = "计划名称")
    private String planName;
    
    /**生产模板ID*/
    @Excel(name = "生产模板ID", width = 15)
    @ApiModelProperty(value = "生产模板ID")
    private String templateId;
    
    /**生产模板名称*/
    @Excel(name = "生产模板名称", width = 15)
    @ApiModelProperty(value = "生产模板名称")
    private String templateName;
    
    /**计划类型(1-模板生成,2-自定义创建)*/
    @Excel(name = "计划类型", width = 15, dicCode = "plan_type")
    @ApiModelProperty(value = "计划类型(1-模板生成,2-自定义创建)")
    private Integer planType;
    
    /**计划开始日期*/
    @Excel(name = "计划开始日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "计划开始日期")
    private Date planStartDate;
    
    /**计划结束日期*/
    @Excel(name = "计划结束日期", width = 15, format = "yyyy-MM-dd")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "计划结束日期")
    private Date planEndDate;
    
    /**计划生产数量*/
    @Excel(name = "计划生产数量", width = 15)
    @ApiModelProperty(value = "计划生产数量")
    private Integer planQuantity;
    
    /**实际生产数量*/
    @Excel(name = "实际生产数量", width = 15)
    @ApiModelProperty(value = "实际生产数量")
    private Integer actualQuantity;
    
    /**状态(0-待审核,1-已审核,2-已下发,3-已领取,4-生产中,5-已完成,6-已取消)*/
    @Excel(name = "状态", width = 15, dicCode = "plan_status")
    @ApiModelProperty(value = "状态(0-待审核,1-已审核,2-已下发,3-已领取,4-生产中,5-已完成,6-已取消)")
    private Integer status;
    
    /**计划负责人*/
    @Excel(name = "计划负责人", width = 15)
    @ApiModelProperty(value = "计划负责人")
    private String planManager;
    
    /**优先级(1-低,2-中,3-高)*/
    @Excel(name = "优先级", width = 15, dicCode = "priority_level")
    @ApiModelProperty(value = "优先级(1-低,2-中,3-高)")
    private Integer priority;
    
    /**计划模式(1-模板计划,2-自定义计划,3-合并计划)*/
    @Excel(name = "计划模式", width = 15, dicCode = "plan_mode")
    @ApiModelProperty(value = "计划模式(1-模板计划,2-自定义计划,3-合并计划)")
    private Integer planMode;
    
    
    /**领取人ID*/
    @ApiModelProperty(value = "领取人ID")
    private String claimedBy;
    
    /**领取人姓名*/
    @Excel(name = "领取人姓名", width = 15)
    @ApiModelProperty(value = "领取人姓名")
    private String claimedByName;
    
    /**领取时间*/
    @Excel(name = "领取时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "领取时间")
    private Date claimedTime;
    
    /**备注*/
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
    
    /**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
    
    /**创建日期*/
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    
    /**更新人*/
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    
    /**更新日期*/
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
    
    /**所属部门*/
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
    
    /**租户ID*/
    @ApiModelProperty(value = "租户ID")
    private Integer tenantId;
    
    /**总任务数量（非数据库字段）*/
    @TableField(exist = false)
    @ApiModelProperty(value = "总任务数量")
    private Integer totalTasks;
    
    /**已完成任务数量（非数据库字段）*/
    @TableField(exist = false)
    @ApiModelProperty(value = "已完成任务数量")
    private Integer completedTasks;
    
    /**待处理任务数量（非数据库字段）*/
    @TableField(exist = false)
    @ApiModelProperty(value = "待处理任务数量")
    private Integer pendingTasks;
}
